﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.IO;

namespace ClockwiseClient
{
    public partial class FormLogin : Form
    {
        public FormLogin()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            button1.Enabled = false;
            label1.Visible = true;
            progressBar1.Visible = true;
            progressBar1.Maximum = 100;
            ClassStockData classStockData = (ClassStockData) ClassStock.GetInstance();
            classStockData.SetFormLogin(this).LoadStockInfo();
        }

        public void SetText(string str)
        {
            label1.Text = str;
        }

        public void SetValue(int percent)
        {
            progressBar1.Value = percent;
        }

        public void Hidden()
        {
            textBox1.Visible = false;
            progressBar1.Visible = false;
            Hide();
            FormMain formMain = new FormMain();
            formMain.WindowState = FormWindowState.Maximized;
            formMain.SetFormLogin(this).ShowDialog();
        }
    }

}
